﻿@inherits AdminCompontentBase

<SSelect Value="Value"
               ValueChanged="ValueChanged"
               Items="ThirdPartyIdps!.Where(e => e.Id==Value || Excludes.Contains(e.Id) is false).ToList()"
               Label="@T(Label??"")"
               ItemText="e => e.Name"
               ItemValue="e => e.Id"
               Small=Small
               Clearable=Clearable
               BackgroundColor="@(FillBackground?"fill-background":"white")"
               Style="@($"{Style}")"
               Class="@($"{Class}")">
    <ItemContent Context="data">
        <div class="d-flex align-center" style="height:48px;">
            @if (data.Item?.Name == LdapConsts.LDAP_NAME)
            {
                <SIcon Size="30">@data.Item?.Icon</SIcon>
            }
            else
            {
                <MAvatar Size=30>
                    <img src="@data.Item?.Icon" />
                </MAvatar>
            }
            <div class="my-auto">
                <span class="body2 emphasis2--text ml-2">@data.Item?.Name</span> 
            </div>                      
        </div>
    </ItemContent>
</SSelect>